package app.view.component.movie 
{
	import app.facade.App;
	import com.temple.core.CoreMovieClip;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	/**
	 * ...
	 * @author PHANCUONG87
	 */
	[Embed(source="../../../../../lib/ui.swf", symbol="setting")]
	public class Setting extends CoreMovieClip
	{
		public var mcQuay:MovieClip;
		public var mcKeo:MovieClip;
		
		public function Setting() 
		{
			mcQuay.addEventListener(MouseEvent.MOUSE_UP, onhanlerEvent);
			mcKeo.addEventListener(MouseEvent.MOUSE_UP, onhanlerEvent);
		}
		
		public function onhanlerEvent(evt:MouseEvent):void 
		{
			sendNotification(App.HIDE_SETTING); 
			switch (evt.currentTarget) 
			{
				case mcQuay:
					App.MODE = 1;
					sendNotification(App.CHANGE_MODE);
				break;
				case mcKeo:
					App.MODE = 2;
					sendNotification(App.CHANGE_MODE);
				break;
				default:
			}
		}
		
		public function show():void {
			this.visible = true;
			
		}
		
		public function hide():void {
			this.visible = false;
		}
	}

}